<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>字符串</title>
</head>
<body>
<script type="text/javascript">
  var str1 = "hello";
  console.log(str1);
  var str2 = 'hello';
  console.log(str2);
  //引号不可嵌套
  var str3 = "she said:'hello!'";
  console.log(str3);
  //可以使用转义字符
  var str4 = "she said:\"hello!\"";
  console.log(str4);

  console.log("str4");//输出自变量
  console.log(str4);//输出变量str4
</script>
</body>
</html>